import sys

def dfs(start,val,res,out):
    if val == 0:
        res.append(out[:])
        return
    for i in range(start,val+1):
        out.append(i)
        dfs(i,val-i,res,out)
        out.pop(-1)

def main(argv):
    target_val = int(argv[0])
    res = []
    dfs(1,target_val,res,[])

    count = 0
    # for tmp in res:
    #     count+=1
    #     print("[" + str(count) + "]" + str(tmp))

    count2 = 0
    for tmp in res:
        max_val_count = 0
        max_val = max(tmp)
        for k in tmp:
            if k == max_val:
                if max_val_count < 1:
                    max_val_count+=1
                else:
                    count2+=1
                    print("[" + str(count2) + "]" + str(tmp))
                    break

if __name__ == "__main__":
    main(sys.argv[1:])

    